Skip to content

feat: cut over Observatory screens to Phlo API - #1

Draft
iamgp wants to merge 4 commits into
mainfrom
feat/wave-9-observatory-api-cutover
Draft

iamgp wants to merge 4 commits into
mainfrom
feat/wave-9-observatory-api-cutover

Conversation

@iamgp

@iamgp iamgp commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Replacement merge route

The product deliverable is Phlo #1051, which bundles the replacement in the Phlo repository. This repository is temporary; do not merge either cutover here. Observatory PR #2 is the validated source reference. This older draft remains open as a reference for its stronger schema-contract checker. The corrected stack landing plan governs the Phlo deliverable. The original evidence and limits below describe this draft, not the replacement.

Summary

References phlohouse/phlo#1035 (phase 9).

  • Replace fixture-backed route data with typed server-side adapters to Phlo /api/v1 across overview, staging, incidents, assets, pipelines, query, branches, settings, identity, and audit screens.
  • Add a server-only API client that restricts requests to the configured API origin, forwards the incoming session cookie only server-side, disables caching, and surfaces bounded API errors.
  • Remove the fake /states gallery and disable actions that are not available from the API rather than simulating writes in the UI.
  • Compare client Zod and OpenAPI request/response field names, directional type compatibility, required fields, enum values, nested object and array item schemas, schema references, and path parameters. Negative tests cover request/response type, enum, and required-field drift.
  • Add route architecture guards, API/client contract tests, expanded browser smoke coverage for distinct synthetic prod/staging routes and stale state, and a disposable demo API for preview only.
  • Correct the service-status response schema to accept the API's unavailable status instead of rejecting valid service responses.

The API response-model fixes found by the stronger contract check are in the companion draft Phlo API PR #1049, stacked on phase-7 PR #1048. Route-inventory and legacy-integration tests pass. This work does not remove old routes.

Validation

  • npm test — 17 tests passed.
  • node scripts/check-api-contract.mjs /tmp/phlo-openapi-wave9-final.json — passed against a locally generated Phlo OpenAPI document (46 paths, 48 operations), including actual client/API schema compatibility.
  • .venv/bin/pytest -q packages/phlo-api/tests/test_v1_query_api.py packages/phlo-api/tests/test_v1_admin_identity.py packages/phlo-api/tests/test_v1_admin_audit.py packages/phlo-api/tests/test_v1_jobs_read.py packages/phlo-api/tests/test_v1_branch_workflows.py — 45 passed. One Starlette/httpx deprecation warning and non-failing observe-core shutdown flush messages.
  • API legacy-integration, route-inventory, and error-envelope tests — 53 passed.
  • Latest standalone API contract suite — 6 passed.
  • npm run typecheck and npm run build — passed.
  • CHROME_PATH=/home/user/.agent-browser/browsers/chrome-154.0.8037.57/chrome OBSERVATORY_BASE_URL=https://t-03gy1ies9xk87ideoba59mnye-p28156.onamp.dev npm run test:browser — passed against disposable synthetic prod/staging data.
  • Rendered and inspected the staging pipeline detail, confirming the staging/synthetic indicators and failure pattern render without an undefined duration: wave9-staging-pipeline-schema-check.png.
  • git diff --check — passed.
  • GitHub reports no configured checks on this Observatory PR branch.

Remaining before Wave 9 exit

This remains a draft and phase 9 is not complete. The preview uses synthetic prod/staging data and does not establish real-service connectivity or authorization. A disposable IoT lakehouse attempt did not complete: Dagster failed to resolve the example asset jobs and the dbt compile hook timed out, so no populated-lakehouse browser integration was verified.

There are also non-service API gaps: no canonical v1 governed Dataset inventory/detail endpoint and no server-backed query-history list endpoint. The replacement UI correctly reports those views unavailable rather than projecting assets as Datasets or displaying browser-local query records. The legacy Dataset read is currently outside /api/v1; exposing it there needs proper environment/ref scoping through the durable Dataset authority, and query history needs a defined server-backed listing contract. These require API work before only real-service checks remain.

Old routes remain mounted and legacy integration/route-inventory tests passed, so this PR has not stranded their callers. Before retiring duplicates in a later cutover, inventory and test every remaining consumer. Full production/staging authorization plus outage/retry/stale-state checks against real installations remain unverified. No production/staging installation was accessed or written. Do not treat this PR as approval to merge, deploy, or write to a live installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant